package com.mmall.concurrency.example.immutable;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
import com.mmall.concurrency.annoations.NotThreadSafe;
import lombok.extern.slf4j.Slf4j;

import java.util.Collections;
import java.util.Map;


@Slf4j
public class ImmutableExample3 {

   private final static ImmutableList<Integer> list = ImmutableList.of(1,2,3);

   private final static ImmutableSet set =ImmutableSet.copyOf(list);

   private final static ImmutableMap<Integer,Integer> map = ImmutableMap.of(1,2,3,4);

    public static void main(String[] args) {
        list.add(4);
        set.add(3);
    }

}
